

import { Button } from 'antd';
import { inject, observer } from 'mobx-react';
import React from 'react';
import LoadingDrewer from '../../store/loadingDrewer';
import './Loading0.less'




const Loading0 = inject("loadingDrewer")(observer((props: {}) => {

    const loadingDrewer = (props as any).loadingDrewer as LoadingDrewer

    const showDrawer = () => {
        loadingDrewer.setMd(md)
        loadingDrewer.setVisible(true)
    };

    const md: string = `### html

~~~html
<div class="loading">
  <div class="dot"></div>
  <div class="dot"></div>
  <div class="dot"></div>
  <div class="dot"></div>
  <div class="dot"></div>
</div>
~~~

### css

~~~css
.dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-block;
    animation: slide 1.5s infinite;
}
.dot:nth-child(1) {
    animation-delay: 0.1s;
    background: #32aacc;
}
.dot:nth-child(2) {
    animation-delay: 0.3s;
    background: #64aacc;
}
.dot:nth-child(3) {
    animation-delay: 0.5s;
    background: #96aacc;
}
.dot:nth-child(4) {
    animation-delay: 0.7s;
    background: #c8aacc;
}
.dot:nth-child(5) {
    animation-delay: 0.9s;
    background: #faaacc;
}
@keyframes slide {
    0% {
      transform: scale(1);
    }
    50% {
      opacity: 0.8;
      transform: scale(2);
    }
    100% {
      transform: scale(1);
    }
}
~~~
`
    return (
        <div className="Loading0 Loading">
            <div className="demoshow">
                <div className="loading">
                    <div className="dot"></div>
                    <div className="dot"></div>
                    <div className="dot"></div>
                    <div className="dot"></div>
                    <div className="dot"></div>
                </div>
            </div>
            <div className="bottomBtn">
                <Button type="primary" onClick={showDrawer}>{`<code />`}</Button>
            </div>
        </div>
    )
}))

export default Loading0